import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ManInfoWidget extends StatefulWidget {
  final String text01;
  final String text02;
  final String text03;
  final String text04;
  final String text05;
  final String text06;

  ManInfoWidget(
      {Key key,
      this.text01,
      this.text02,
      this.text03,
      this.text04,
      this.text05,
      this.text06})
      : super(key: key);

  @override
  _ManInfoWidgetState createState() => _ManInfoWidgetState();
}

class _ManInfoWidgetState extends State<ManInfoWidget> {
  @override
  Widget build(BuildContext context) {
    TextStyle style1 = TextStyle(
      fontSize: 16,
      color: Colors.white,
    );
    return Expanded(
      flex: 1,
      child: Container(
        alignment: Alignment.center,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            SelectableText(
              widget.text01,
              style: style1,
            ),
            SelectableText(
              widget.text02,
              style: style1,
            ),
            SizedBox(
              height: 10,
            ),
            SelectableText(
              widget.text03,
              style: TextStyle(
                fontSize: 14,
                color: Color.fromRGBO(126, 146, 177, 1),
              ),
            ),
            SelectableText(
              widget.text04,
              style: TextStyle(
                fontSize: 14,
                color: Color.fromRGBO(126, 146, 177, 1),
              ),
            ),
            SelectableText(
              widget.text05,
              style: TextStyle(
                fontSize: 14,
                color: Color.fromRGBO(126, 146, 177, 1),
              ),
            ),
            SelectableText(
              widget.text06,
              style: TextStyle(
                fontSize: 14,
                color: Color.fromRGBO(126, 146, 177, 1),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

class TextCenter extends StatelessWidget {
  final String text01;
  final String text02;
  final double left;
  final double top;

  const TextCenter({Key key, this.text01, this.text02, this.left, this.top})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Positioned(
      left: left,
      top: top,
      child: Container(
        width: 65,
        alignment: Alignment.center,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            SelectableText(
              text01,
              textAlign: TextAlign.center,
              style: TextStyle(
                  fontSize: 30,
                  color: Colors.white,
                  fontWeight: FontWeight.bold),
            ),
            SelectableText(
              text02,
              style: TextStyle(
                  fontSize: 30,
                  color: Colors.white,
                  fontWeight: FontWeight.bold),
            ),
          ],
        ),
      ),
    );
  }
}

class ImageNetWork extends StatelessWidget {
  final String imageUrl;
  final double width;

  const ImageNetWork({Key key, this.imageUrl, this.width}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: width,
      child: new Image.network(
        imageUrl,
        fit: BoxFit.fill,
      ),
    );
  }
}

class ImageWidget extends StatelessWidget {
  final String imageUrl;
  final double width;
  final double height;
  final bool isCenter;

  const ImageWidget(
      {Key key, this.imageUrl, this.width, this.height, this.isCenter = false})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return isCenter
        ? Stack(
      alignment: Alignment.center,
            children: [
              Positioned(
                top: 0,
                child: Container(
                  width: width,
                  child: new Image.network(
                    imageUrl,
                    fit: BoxFit.fill,
                  ),
                ),
              ),
              Container(
                height: height,
              ),
            ],
          )
        : Stack(
            children: [
              Positioned(
                top: 0,
                child: Container(
                  width: width,
                  child: new Image.network(
                    imageUrl,
                    fit: BoxFit.fill,
                  ),
                ),
              ),
              Container(
                height: height,
              ),
            ],
          );
  }
}
